package entity;

/**
 * 货物实体类
 * @author hy
 * @data 2017/10/17
 */
public class Goods {

    private int gid;
    private String gname;
    private double gprice;
    private int gnum;

    /**
     * 添加商品
     * @param gname
     * @param gprice
     * @param gnum
     */
    public Goods(String gname,double gprice,int gnum){
        this.gname = gname;
        this.gprice = gprice;
        this.gnum = gnum;
    }

    /**
     * 展示商品
     * @param gid
     * @param gname
     * @param gprice
     * @param gnum
     */
    public Goods(int gid , String gname , double gprice , int gnum){
        this.gid = gid;
        this.gname = gname;
        this.gprice = gprice;
        this.gnum = gnum;
    }


    /**
     * 根据ID修改商品
     * @param gid
     * @param gnum
     */
    public Goods(int gid, int gnum){
        this.gid = gid;
        this.gnum = gnum;
    }

    /**
     * 根据ID修改商品
     * @param gid
     * @param gprice
     */
    public Goods(int gid , double gprice){
        this.gid = gid;
        this.gprice = gprice;
    }

    /**
     * 根据ID修改商品
     * @param gid
     * @param gname
     */
    public Goods(int gid,String gname){
        this.gid = gid;
        this.gname = gname;
    }

    public int getGid() {
        return gid;
    }

    public void setGid(int gid) {
        this.gid = gid;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }

    public double getGprice() {
        return gprice;
    }

    public void setGprice(double gprice) {
        this.gprice = gprice;
    }

    public int getGnum() {
        return gnum;
    }

    public void setGnum(int gnum) {
        this.gnum = gnum;
    }
}
